<?php


namespace app\common\model\xilujob;


use think\Cache;
use think\Model;

class FeedbackType extends Model
{
    protected $name = 'xilujob_feedback_type';
    const CACHE_KEY = 'feedback_types';

    protected $append = [

    ];

    public static function getAll() {
        $cacheKey = self::CACHE_KEY;
        $all = Cache::get($cacheKey);
        if(!$all) {
            $all = static::where('status',1)->column('id,name');
            Cache::set($cacheKey, $all, 3600);
        }
        return $all;
    }

}